home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-15 | 1.9 KB | 80 lines | [TEXT/MPS ] |
- // UAEGestalt.cp
- // Copyright © 1991-92 by Apple Computer, Inc. All rights reserved.
- // Kent Sandvik DTS
- // This file contains the basic TAEApplication member functions
- //
- // <1> khs 1.0 First final version
-
-
- // INCLUDES
-
- #ifndef __AEGESTALT__
- #include "UAEGestalt.h"
- #endif
-
- // TAEApplication
- // Empty constructor - for avoiding ptabs in global data space
- #pragma segment ARes
- TAEApplication::TAEApplication()
- {
- }
-
- // Initialize the Application object
-
- #pragma segment AInit
- pascal void TAEApplication::IAEApplication(OSType fileType,
- OSType creator)
- {
- inherited::IApplication(fileType, creator);
-
- if (gDeadStripSuppression)
- {
- // so the linker doesn't dead strip class info
- macroDontDeadStrip(TLabelView);
- macroDontDeadStrip(TInformationView);
- macroDontDeadStrip(TGrayFill);
- }
- // register adorner types
- RegisterStdType("TGrayFill", 'gray');
- }
-
-
- // Create a new TDocument from the class
- #pragma segment AOpen
- pascal TDocument* TAEApplication::DoMakeDocument(CommandNumber/* itsCmdNumber */,
- TFile*/* itsFile */ )
- {
- TAEDocument * aAEDocument = new TAEDocument;
- aAEDocument->IAEDocument();
- return aAEDocument;
- }
-
-
- // Handle incoming AppleEvents calls, in our case to the TAEServerCommand
- #pragma segment ASelCommand
- pascal void TAEApplication::DoAppleCommand(CommandNumber theNumber,
- const AppleEvent& message,
- const AppleEvent& reply)
- {
- switch (theNumber)
- {
- // case Gestalt server AE, create a command from the AE, and post it!
- case cAEProvideGestaltInfo:
- TAEServerCommand * aCommand = new TAEServerCommand;
- aCommand->InitializeFromAppleEvent(theNumber, this, kCantUndo, kDoesNotCauseChange, NULL, message, reply);
- this->PostAnEvent(aCommand);
- break;
-
- default:
- inherited::DoAppleCommand(theNumber, message, reply);
- }
- }
-
-
- // Show our cute About Box with Jeff trying to destroy my portable back home
- #pragma segment ARes
- pascal void TAEApplication::DoAboutBox()
- {
- CreateAboutBox();
- }
-